import java.awt.Graphics;

import com.rsbuddy.event.events.MessageEvent;
import com.rsbuddy.event.listeners.MessageListener;
import com.rsbuddy.event.listeners.PaintListener;
import com.rsbuddy.script.ActiveScript;
import com.rsbuddy.script.Manifest;
import com.rsbuddy.script.methods.Inventory;

@Manifest(name = "Rizowski's Miner", description = "I will mine anywhere from Fally!", authors = "Rizowski")
public class RizowskisMiner extends ActiveScript implements MessageListener, PaintListener {
	
	int[] pickaxe = {1265, 1267, 1269, 1273, 1271, 1275};
	boolean pick;
	
	
	public boolean onStart() { 
		log("Welcome to Rizowski's Miner 1.0");
		//log("I am now checking to see if you have a pick.");
		//pickaxe = new int[6];
		
		return true; 
	}

	public void onFinish(){
		
	}
	
	
	
	@Override
	public int loop() {
		if(pick){//if you do have a pick then else stop with out logging out
			//find path and run to it.
		}
		else
			stopScript(false);
		
		return 590; 
	}

	private void stopScript(boolean b) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void messageReceived(MessageEvent e) {
		
	}

	
	@Override
	public void onRepaint(Graphics g) {//paint action
		
	}
	
	public boolean pickCheck(){//checks to see if you have a pickaxe
		if(Inventory.containsOneOf(pickaxe)){
			sleep(550);
			pick = true;
		}
		else{
			log("There are no picks in Inv, Hope you have one on hand.");
			sleep(505);
			pick = false;
		}
		return pick;
	}
}